package pers.qianyu.module.security.model;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author mizzle rain
 * @date 2021-05-03 21:34
 */
public class RequestInfoModel implements Serializable {
    private static final long serialVersionUID = -417768777138130784L;
    private String uri;
    private String method;

    public RequestInfoModel() {
    }

    public RequestInfoModel(String uri, String method) {
        this.uri = uri;
        this.method = method;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RequestInfoModel that = (RequestInfoModel) o;
        return Objects.equals(uri, that.uri) && Objects.equals(method, that.method);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uri, method);
    }

    @Override
    public String toString() {
        return "RequestInfoModel{" +
                "uri='" + uri + '\'' +
                ", method='" + method + '\'' +
                '}';
    }
}
